UserInfoGridCtl = Ext.extend(GridCtl, {

			getCmItems : function() {

				var items = [this.getCmItem('ID', 'id', false),
						this.getCmItem('用户名', 'username', true),
						this.getCmItem('密码', 'password', false),
						this.getCmItem('部门', 'departmentid', true),
						this.getCmItem('状态', 'status', false),
						this.getCmItem('真实姓名', 'stuffid', false)]

				return items;
			},
			getCommonConfig : function() {

				var config = {
					region : 'center'
				};

				return config;

			},
			configBbarItems : function(config) {

				return config;

			},
			load : function(node) {

				var store = this.store;

				store.baseParams = {
					listType : node.id
				};
				store.load({
							params : {
								limit : 30,
								start : 0

							}
						});

			},
			getStoreUrl : function() {

				var resource = 'user.do';
				var server = cf.getC('s');
				var url = server.getUrl({
							resource : resource,
							act : 'r'
						});
				return url;
			},
			getRecord : function(index) {
				var store = this.store;
				return store.getAt(index);
			},
			updateSucess : function(response) {

				this.store.reload();

				// alert(Ext.encode(response));
			},
			getSelectedRecord : function() {
				var sm = this.cmp.getSelectionModel();
				return sm.getSelected();
			},
			configButtons : function(config) {

				// usermgr_add
				
//				, {
//							text : '修改',
//							handler : this.modify,
//							scope : this
//						}

				var buttons = [{
							text : '添加',
							handler : this.add,
							scope : this
						}];

				var gcc = cf.getC('gcc');
				if (gcc.user.permissions.usermgr_del) {
					buttons.push({
								text : '删除',
								handler : this.del,
								scope : this
							});
				}

				config.buttonAlign = 'left';
				config.buttons = buttons;

				return config;

			},
			add : function() {
				var uawc = cf.getC('uawc');

				uawc.show();
			},
			modify : function() {
				var uawc = cf.getC('uawc');
				var uafc = cf.getC('uafc');

				var record = this.getSelectedRecord();
				if (!record) {
					alert('请先选择一条记录！');
					return;
				}
				uafc.load(record);
				uawc.show();
			},
			del : function() {

				var uawc = cf.getC('uawc');
				var uafc = cf.getC('uafc');
				var recordList = this.getSelectList();
				if (!recordList) {
					alert('请先选择一条记录！');
					return;
				}
				var idList = this.getSelectIdList(recordList);

				var s = cf.getC('s');

				var para = {
					resource : 'user.do',
					act : 'd',
					params : {
						idList : Ext.encode(idList)
					},
					cbf : this.delSuccess,
					scope : this
				};
				s.request(para);

			},
			delSuccess : function(response) {
				var cigc = cf.getC('usrmger');
				cigc.reload();
			}

		});
